package com.mydemo.design_pattern.action_type.memento_pattern;

import java.util.ArrayList;
import java.util.List;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: CareTaker, v1.0 2019-09-23 14:33 liming1 Exp $
 */
public class CareTaker {

    private List<Memento> mementos = new ArrayList<>();

    public void add(Memento state){
        mementos.add(state);
    }

    public Memento get(int index){
        return mementos.get(index);
    }

}
